package cn.wolfcode.trip.base.util;

import cn.wolfcode.trip.base.domain.FriendshipComment;
import cn.wolfcode.trip.base.domain.FriendshipReply;
import cn.wolfcode.trip.base.domain.ProductOrder;
import lombok.Getter;
import lombok.Setter;

//用于返回JSON的工具
@Getter@Setter
public class JSONResult {
    //是否操作成功,默认成功
    private boolean success = true;
    //错误信息
    private String msg;

    private Object user;

    private FriendshipReply reply;

    private FriendshipComment comment;

    private ProductOrder productOrder;
    //标记错误信息,只有在出错时才调用
    public JSONResult mark(String msg) {
        success = false;
        this.msg = msg;

        return this;
    }
}
